<#include "./common/header.htm">
<style type="text/css">
	.J_mainContent{display:flex}
	.J_iframe{
		flex:1;
	}
	body.body-small.fixed-sidebar.mini-navbar #page-wrapper, body.fixed-sidebar #page-wrapper{margin:0 0 0 40px;}
	.navbar-header{width:100%;height: 50px;}
	.m-t-xs{line-height:0;font-size:14px;margin:5px;float:left;}
	.text-xs{float:left;line-height:34px;}
	.roll-right.J_tabRight{right:80px;}
	.roll-right.btn-group{right:0;}
	.indexbtn{float:right;font-family: 微软雅黑;font-size: 14px;line-height: 50px;font-weight: bold;cursor:pointer;}
	.rq:before{content: "*";display: inline-block;margin-right: 4px;line-height: 1;font-family: SimSun;font-size: 12px;color: #ed3f14;}
</style>
<body class="fixed-sidebar mini-navbar full-height-layout gray-bg" style="overflow:hidden">
	  <#if Session["loginUser"]?exists>
	    <input id="vid" hidden value='${Session["loginUser"].id}' />
	  </#if>
    <div id="wrapper">
        <!--左侧导航开始-->
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="nav-close"><i class="fa fa-times-circle"></i>
            </div>
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">
                        <div class="dropdown profile-element">
                        	<#list Session.firstLevelMenuList as menu>
                        		<#if (menuCode!"")=="${menu.menuCode}">
							<#if menuCode=='callanalysis'>
							<div class="calldaimg"></div>
							<#elseif menuCode=='billanalysis'>
							<div class="billdaimg"></div>
							<#elseif menuCode2=='manageList'>
							<div class="yongdaimg"></div>
							<#elseif menuCode2=='Robot'>
							<div class="xmdaimg"></div>
							<#elseif menuCode2=='caselist'>
							<div class="anjidaimg"></div>
							</#if>
								<div style="color:#fff;" class="comdafont">${menu.menuName}</div>
                        		</#if>
                        	</#list>
                        </div>

			<#if menuCode=='callanalysis'>
			<div class="logo-element"><div class="hualogoimg-con"></div>
			</div>
			<#elseif menuCode=='billanalysis'>
			<div class="logo-element"><div class="logoimg-con"></div>
			</div>
			<#elseif menuCode2=='manageList'>
			<div class="logo-element"><div class="yongimg-con"></div>
			</div>
			<#elseif menuCode2=='Robot'>
			<div class="logo-element"><div class="xmimg-con"></div>
			</div>
			<#elseif menuCode2=='caselist'>
			<div class="logo-element"><div class="anjimg-con"></div>
			</div>
		</#if>


                    </li>

                    <#list Session.firstLevelMenuList as menu>
                   		<#if (menuCode!"")=="${menu.menuCode}" && secondLevelMenuMap["${menu.menuId}"]?? && (secondLevelMenuMap["${menu.menuId}"]?size > 0)>
                   			<#list secondLevelMenuMap["${menu.menuId}"] as secondMenu>
                   				<#if (secondMenu.menuCode!"")!="billimport" && (secondMenu.menuCode!"")!="phoneimport">
			                    	<li>
				                        <a <#if secondMenu.menuUrl??>class="J_menuItem" href="${ctx}${secondMenu.menuUrl!}" tree="${secondMenu.requestType!}"<#else>href="javascript:void(0);"</#if>>
					                        <i class="fa ${secondMenu.menuIcon!}"></i>
						                    <#if thirdLevelMenuMap["${secondMenu.menuId}"]?? && (thirdLevelMenuMap["${secondMenu.menuId}"]?size > 0) && (secondMenu.menuUrl!"")=="">
			                           			<span class="fa arrow"></span>
				                        	</#if>
					                        <span class="nav-label">${secondMenu.menuName!}</span>
				                        </a>
				                        <#if thirdLevelMenuMap["${secondMenu.menuId}"]?? && (thirdLevelMenuMap["${secondMenu.menuId}"]?size > 0) && (secondMenu.menuUrl!"")=="">
					                        <ul class="nav nav-second-level">
					                        	<#list thirdLevelMenuMap["${secondMenu.menuId}"] as thirdMenu>
					                        		<li>
					                        			<a <#if thirdMenu.menuUrl??>class="J_menuItem" href="${ctx}${thirdMenu.menuUrl!}" tree="${thirdMenu.requestType!}"<#else>href="javascript:void(0);"</#if>>
					                        			${thirdMenu.menuName!}</a>
					                            	</li>
					                        	</#list>
					                        </ul>
			                        	</#if>
				                    </li>
	                        	</#if>
		                    </#list>
	                 	</#if>
                    </#list>
                </ul>
            </div>
        </nav>
        <!--左侧导航结束-->
        <!--右侧部分开始-->
        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top tophome" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                    	<#if menuCode=='billanalysis' || menuCode=='callanalysis'>
						<div class="casexx" onclick="chooseCase()"><#if caseName==''>选择案件<#else>${caseName!}</#if><div class="choseimg"></div></div>
						</#if>

				<div class="dropdown home-setting">
					<a data-toggle="dropdown" class="dropdown-toggle" href="#">
                                <span class="clear">
                               <!--<span class="block m-t-xs"><strong class="font-bold">${loginUser.nickName!}</strong></span>
                                <span class="text-muted text-xs block">${loginUser.roleName!}<b class="caret"></b></span>-->
									<span class="block m-t-xs">
										<strong class="">
											<div class="toplogin-img"></div>
											<div class="user-nick"><span class="user-nickfont">${loginUser.nickName!}&nbsp;&nbsp;</span>
										   <span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
									   		</div>
										</strong>
									</span>
									<!--<span class="text-muted text-xs block"><b class="caret"></b></span>-->
                                </span>
					</a>
					<ul class="dropdown-menu animated fadeInRight m-t-xs">
						<li onclick="setPwd()"><span class="iconfont icon-icon_xiugaimima homeicon-span"></span><a href="javascript:void(0);">修改密码</a>
						</li>
						<!--<li class="systemUp" id="version-up" onClick="show()"><span class="iconfont icon-shuaxin homeicon-span"></span><a href="#">系统升级</a>
						</li>-->
						<!--<li><span class="iconfont icon-lianxiwomen homeicon-span"></span><a href="javascript:void(0);">联系我们</a>
						</li>-->
						<li class="divider"></li>
						<li><span class="iconfont icon-tuichu homeicon-span"></span><a href="${ctx}logout">安全退出</a>
						</li>
					</ul>
				</div>
				<div class="indexbtncon">
					<!--<span class="glyphicon glyphicon-home" aria-hidden="true"></span>-->
					<div class="forindex-img"></div>
					<span class="indexbtn" onclick="toIndex()">首页</span>
				</div>

                        <#if menuCode=='billanalysis'>
                        	<span class="indeximport J_menuItem" href="${ctx}/bill/import" tree="0">账单导入</span>
		            	<#elseif menuCode=='callanalysis'>
	                        <span class="indeximport J_menuItem" href="${ctx}/phone/record/phoneimport" tree="0">话单导入</span>
		            	</#if>
					<!--<input type="text" placeholder="姓名/手机/银行账号/身份证号" class="topsearch">
					<span class="glyphicon glyphicon-search topsearchi" aria-hidden="true"></span>-->
                    </div>

                </nav>
            </div>
            <div class="row content-tabs">
                <button class="roll-nav roll-left J_tabLeft"><i class="fa fa-backward"></i>
                </button>
                <nav class="page-tabs J_menuTabs page-tabshome">
                    <div class="page-tabs-content">
	                    <#if menuCode=='billanalysis'>
	                   		<a href="javascript:;" <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">class="J_menuTab"<#else>class="active J_menuTab"</#if> data-id="${ctx}/bill/stream/statistics">账单分析</a>
	                   	<#elseif menuCode=='callanalysis'>
	                   		<a href="javascript:;" <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">class="J_menuTab"<#else>class="active J_menuTab"</#if> data-id="${ctx}/phone/init">话单分析</a>
	                   	</#if>
	                    <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">
	                    	<#list Session.firstLevelMenuList as menu>
			            		<#if (menuCode!"")=="${menu.menuCode}" && secondLevelMenuMap["${menu.menuId}"]?? && (secondLevelMenuMap["${menu.menuId}"]?size > 0)>
			            			<#list secondLevelMenuMap["${menu.menuId}"] as secondMenu>
			            				<#if (menuCode2!"")=="${secondMenu.menuCode}">
							                <a href="javascript:void;" class="active J_menuTab" data-id="${ctx}${secondMenu.menuUrl!}">${secondMenu.menuName!}<i class="fa fa-times-circle"></i></a>
			            				</#if>
			            			</#list>
			            		</#if>
			            	</#list>
	                    </#if>
                    </div>
                </nav>
                <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
                </button>
                <div class="btn-group roll-nav roll-right">
                    <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
                    </button>
                    <ul role="menu" class="dropdown-menu dropdown-menu-right">
                        <li class="J_tabShowActive"><a>定位当前选项卡</a>
                        </li>
                        <li class="divider"></li>
                        <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                        </li>
                        <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="row J_mainContent" id="content-main">
            	<#if menuCode=='billanalysis'>
	            	<#include "account/leftTree.htm">
	            	<iframe class="J_iframe" name="iframe0" width="100%" <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">style="display:none;"</#if> height="100%" src="${ctx}/bill/stream/statistics" data-id="${ctx}/bill/stream/statistics" data-tree="1" frameborder="0"></iframe>
            	<#elseif menuCode=='callanalysis'>
	            	<#include "phone/leftTree.htm">
	            	<iframe class="J_iframe" name="iframe0" <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">style="display:none;"</#if> width="100%" height="100%" src="${ctx}/phone/init" data-id="${ctx}/phone/init" frameborder="0" data-tree="1"></iframe>
	            <#else>
	            	<iframe class="J_iframe" name="iframe0" <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">style="display:none;"</#if> width="100%" height="100%" src="${ctx}main" frameborder="0" data-id="mainPage" seamless></iframe>
            	</#if>
                  <#if (menuCode2!"")!="" && (menuCode2!"")!="billflow" && (menuCode2!"")!="phone">
                  	<#list Session.firstLevelMenuList as menu>
	            		<#if (menuCode!"")=="${menu.menuCode}" && secondLevelMenuMap["${menu.menuId}"]?? && (secondLevelMenuMap["${menu.menuId}"]?size > 0)>
	            			<#list secondLevelMenuMap["${menu.menuId}"] as secondMenu>
	            				<#if (menuCode2!"")=="${secondMenu.menuCode}">
					                <iframe class="J_iframe" name="iframe-1" width="100%" height="100%" src="${ctx}${secondMenu.menuUrl!}" seamless frameborder="0" data-tree="${secondMenu.requestType!}" data-id="${ctx}${secondMenu.menuUrl!}" seamless></iframe>
	            				</#if>
	            			</#list>
	            		</#if>
	            	</#list>
                  </#if>
            </div>
        </div>
    </div>
<!-- 遮盖层 -->
<div id="hidebg"></div>
<!-- 弹出层 -->
<div id="hidebox">
	<div class="systemsjbg">
		<div class="newbbcon">
			<div class="findnew">发现新版本</div>
			<div class="newh"></div>
		</div>
		<div class="UpdateContent">
			<p class="UpdateContentt">1、新增自定义功能</p>
			<p class="UpdateContentt">2、修复一些小bug</p>
			<p class="UpdateContentt">3、新增案件功能</p>
		</div>
		<div id="version_up_btn" style="display: none">
			<div class="nowUpdateBtn" >马上升级</div>
			<div class="lateUpdate" onclick="afterUpdateVersion()">以后再说</div>
		</div>
	</div>
</div>

<div class="robot-content">
	<div class="robot-right">
		<div class="bubble-big">您可以查看账单</div>
		<div class="bubble-middle"></div>
		<div class="bubble-small"></div>

		<img class="robot-robotBodyImg" src="${ctx}/plugins/robot/imgs/robot-body.png" alt="">
	</div>
</div>
<!-- chat-content -->
<div class="chat-content">
	<div class="robot-head">
		<img src="${ctx}/plugins/robot/imgs/robot-head.png" alt="">
	</div>
	<div class="chatRobot-header">我是您的贴心机器人,小m~</div>
	<span id="robot-close" class="iconfont icon-guanbi chatRobot-icon"></span>
	<!-- chat-body -->
	<div class="chat-body">
	</div>
	<!-- chat-send -->
	<textarea class="chat-send" placeholder="您可以输入:流入账号统计、共同户名、导入日志等..." ></textarea>
	<div class="btn-send">发送</div>
</div>
<script type="text/javascript" src="${ctx}/cus/base.js"></script>
<script type="text/javascript">
    function show(){  //显示隐藏层和弹出层
        var hideobj=document.getElementById("hidebg");
        hidebg.style.display="block";  //显示隐藏层
        document.getElementById("hidebox").style.display="block";  //显示弹出层
    }
    function hide(){ //去除隐藏层和弹出层
        document.getElementById("hidebg").style.display="none";
        document.getElementById("hidebox").style.display="none";
    }
	var menuCode='${menuCode!}';
    $(document).ready(function(){
        $(".user-edit-con").hide();
    })
    $('.user-nick').click(function(){
        $(".user-edit-con").toggle();
        $(this).children(".glyphicon").toggleClass("glyphicon-menu-down");
        $(this).children(".glyphicon").toggleClass("glyphicon-menu-up")
    });
	var caseId="${caseid!}";
	$(document).ready(function(){
 		$(".sidebar-collapse").mouseenter(function(){
 			$("body").removeClass("mini-navbar"),SmoothlyMenu()
		});
		$(".sidebar-collapse").mouseleave(function(){
			$("body").addClass("mini-navbar"),SmoothlyMenu()
		});
		$(document).on("click",".tree-on",function(){
			$(this).removeClass("tree-on");
			$(this).addClass("tree-off");
			$(".treebox").animate({width:'0'},300,function(){
				$(".account_treeview").css("flex","0 0 5px");
				$(".phone_treeview").css("flex","0 0 5px");
			});
		});
		$(document).on("click",".tree-off",function(){
			$(this).removeClass("tree-off");
			$(this).addClass("tree-on");
			$(".treebox").animate({width:'180px'},300,function(){
				$(".account_treeview").css("flex","0 0 180px");
				$(".phone_treeview").css("flex","0 0 180px");
			});
		});

		var menuCode="${menuCode!}";
		if(!caseId&&(menuCode=='billanalysis'||menuCode=='callanalysis')){
			chooseCase();
		}
	});
	function chooseCase() {
		base.getView({
			url:"${ctx}/casemanage/list?menuCode=${menuCode!}&menuCode2=${menuCode2!}",
			success:function(result){
				bootbox.dialog({
					message:result,
					size:"large",
					boxCss:{"width":"1270px"},
					closeButton : false,
				})
			}
		});
	}
</script>
<style>
	.disable{
		pointer-events:none;
	}
	.systemsjbg{
		background:url("${ctx}/imgs/xtsjbg.png") no-repeat;
		width: 550px;
		height: 596px;
	}
	.newbbcon {
		padding-top: 62px;
		padding-left: 25px;
	}
	.findnew {
		font-size: 30px;
		font-weight: 550;
		font-stretch: normal;
		letter-spacing: 2px;
		color: #ffffff;
	}
	.newh {
		font-size: 20px;
		font-weight: normal;
		font-stretch: normal;
		letter-spacing: 1px;
		color: #ffffff;
	}
	.UpdateContent {
		margin-top: 160px;
		margin-left: 22px;
	}
	p.UpdateContentt {
		margin-bottom: 20px;
		font-size: 16px;
		font-weight: normal;
		font-stretch: normal;
		letter-spacing: 0px;
		color: #666666;
	}
	.nowUpdateBtn{
		width: 440px;
		height: 60px;
		background-color: #4288ea;
		border-radius: 33px;
		text-align: center;
		line-height: 60px;
		font-size: 20px;
		font-weight: normal;
		font-stretch: normal;
		letter-spacing: 1px;
		color: #ffffff;
		margin: 0 auto;
		margin-top: 70px;
		cursor: pointer;
	}
	.nowUpdateBtn:hover{
		background-color: #3296f1;
	}
	.nowUpdateBtn:active{
		background-color: #0c76d7;
	}
	.lateUpdate{
		font-size: 14px;
		font-weight: normal;
		font-stretch: normal;
		letter-spacing: 1px;
		color: #000000;
		opacity: 0.6;
		margin: 0 auto;
		text-align: center;
		margin-top: 10px;
		cursor: pointer;
	}

	/*.ui-dialog-body{
		padding: 0;
	}
	.ui-dialog {
		border: none;
		box-shadow: 0 0 8px rgba(0,0,0,.1)!important;
		!*background: transparent;*!
	}*/
	#hidebg {
		position:absolute;
		left:0px;
		top:0px;
		background-color:#000;
		width:100%;  /*宽度设置为100%，这样才能使隐藏背景层覆盖原页面*/
		height: 100%;
		filter:alpha(opacity=20);  /*设置透明度为60%*/
		opacity:0.2;  /*非IE浏览器下设置透明度为60%*/
		display:none;
		z-Index:2;
	}
	#hidebox {
		position:absolute;
		width: 550px;
		height: 596px;
		top:200px;
		left:30%;
		border-radius: 5px;
		background-color: transparent;;
		display:none;
		z-Index:3;
	}

	#content {
		text-align: center;
		cursor:pointer;
		z-Index:1;
	}
	span.user-nickfont{
		display: inline-block;
		float: right;
		margin-top: -9px;
		margin-right: 20px;
		font-weight: normal;
		font-size: 15px;
	}
	span.glyphicon.glyphicon-menu-down{
		font-size: 10px;
		top: -7px;
		left: 70px;
	}
	.glyphicon.glyphicon-menu-up{
		font-size: 10px;
		top: -8px;
		left: 70px;
	}
	dropdown home-setting{
		opacity: 0.8!important;
	}
	dropdown home-setting:hover{
		opacity:1!important;
	}
	.m-t-xs{
		line-height: 26px;
	}
	.toplogin-img {
		width: 30px;
		height: 30px;
		margin-top: 5px;
		display: inline-block;
		opacity: 0.8;
		margin-right: -9px;
	}
	.toplogin-img:hover{
		opacity: 1.5;
	}
	.navbar .dropdown-menu {
		margin-left: -25px;
		margin-top: -10px;
	}
	strong {
		display: inline-block;
		overflow: hidden;
	}
	.user-nick {
		font-size: 15px;
		color: #fff;
		opacity: 0.8;
		display: inline-block;
	}
	.user-nick:hover{
		opacity: 1;
	}
	.indexbtncon{
		opacity: 0.8;
	}
	.indexbtncon:hover{
		opacity: 1;
	}
	.glyphicon.glyphicon-menu-up{
		font-size: 10px;
	}
	.indexbtn{
		font-size: 15px;
		font-weight: normal;
	}
	.forindex-img{
		margin-top: 10px;
	}
	.comdafont{
		display: inline-block;
		padding-left: 40px;
	}
	li.nav-header {
		height: 50px;
		line-height: 50px;
		font-size: 17px;
	}
	.nav-header{
		padding: 0px 10px;
	}
	a {
		color: #98A7C6;
	}
	a:focus, a:hover {
		color: #fff;
	}
	.systemUp:after{
		content: "";
		width: 10px;
		height: 10px;
		display: inline-block;
		background: red;
		border-radius: 5px;
		position: relative;
		top: -36px;
		left: 110px;
	}
</style>
</body>
</html>

<script>
	//解决tab选项卡切换时数据没有关联上的问题
	$(".page-tabs-content").on('click',"a",function(e){
		var target=e.target;
		var url=target.dataset.id;
		$(".J_iframe[data-id='"+url+"']").attr("src",url)
	})
</script>
